<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>工作维护时间</title>
<link href="../Styles/css.css" rel="stylesheet" type="text/css" />
<script src="../Scripts/My97DatePicker/WdatePicker.js"
	type="text/javascript"></script>
<script src="../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
<script src="../Scripts/IndexManager.js" type="text/javascript"></script>
<script src="../Scripts/selectProject.js" type="text/javascript"></script>
<script type="text/javascript">
	function openWin() {

		showModalDialog(
				"/wanda/project/Wd_ht_project_add.do",
				"example04",
				"dialogWidth:600px;dialogHeight:300px;dialogLeft:200px;dialogTop:150px;center: yes;help:yes;resizable:yes;status:yes")
	}

	function openWin1() {

		/* showModalDialog(
				"/wanda/project/Wd_ht_project_add.do",
				"example04",
				"dialogWidth:600px;dialogHeight:300px;dialogLeft:200px;dialogTop:150px;center: yes;help:yes;resizable:yes;status:yes") */
			location.href="/wanda/project/Wd_ht_project_toAdd.do" ;	
	}
</script>
</head>
<body style="margin-top: 5px; background: #EFF3FF;">

		<div id="divOne">
			
			<div class="cxlb_2" id="indexs">
			<h2>查询客户信息列表</h2>
			<form action="/wanda/customer/WdCustomerList.do" method="post">
				客户姓名：<input type="text" name="cname"/>
				地址：<input type="text" name="address" />
				<input type="submit" value="查询 " />
			</form>
			<h2>客户信息列表</h2>
				<table width="100%" class="tablist">
					<thead>
						<tr>
							<th width="20%">客户姓名</th>
							<th width="15%">性别</th>
							<th width="15%">联系电话</th>
							<th width="15%">购房类型</th>
							<th width="15%">客户类型</th>
							<th width="15%">地址</th>
							
							<th width="">操作</th>

						</tr>
					</thead>
					<tbody id="tab">
						<c:forEach items="${WdCustomerList}"  var="cus">
							<tr>
								<td width="20%">${ cus.customerName }</td>
								<td width="15%">${ cus.sex }</td>
								<td width="15%">${ cus.tel }</td>
								<td width="15%">${ cus.describel }</td>
								<td width="15%">${ cus.customerType }</td>
								<td width="15%">${ cus.address }</td>
							<%-- 	<td>            
                    		<a href="toupdate_customer.do?customerId=${clist.customerId}">修改</a>
                         	||<a href="javaScript:void(0)" onclick="del('${clist.customerId}')">删除</a></td> --%>
							
							 <td width="10%">
                                    <a href="WdCustomerToUpdate.do?customerId=${cus.customerId}" onclick="openWin()"> 修改</a>
                                    <a href = "javaScript:void(0)" onclick="del('${cus.customerId }')">删除</a>
                                </td>
							</tr>

						</c:forEach>
					</tbody>
					<tr>
				</tr>
					
				</table>
			<a href="/wanda/customer/WdCustomerToAdd.do"><h2>添加客户信息</h2></a>
			</div>
		
		</div>
		<input type="hidden" name="hidProductIdSelect" id="hidProductIdSelect" />
			 <script>
             //删除
                function del(customerId){
			  		if(confirm('真的要删除吗?')){
			  			location.href="WdCustomerDelete.do?customerId="+customerId;
			  		}
			  	}
            </script>
</body>
</html>





